/**
 * The type Food.
 *
 * @author Yihan Wang
 * @date 24/06/09
 */
public class Food {
    private String name;
    private double amount;
    private String unit;

    ////////////////////////////////////////////////
    ////////////////////////////////////////////////
    /**
     * Instantiates a new Food.
     */
    public Food() {
    }

    /**
     * Instantiates a new Food.
     *
     * @param name   the name
     * @param amount the amount
     * @param unit   the unit
     */
    public Food(String name, double amount, String unit) {
        this.name = name;
        this.amount = amount;
        this.unit = unit;
    }

    /**
     * Gets name.
     *
     * @return the name
     */
////////////////////////////////////////////////
    public String getName() {
        return name;
    }

    /**
     * Sets name.
     *
     * @param name the name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Gets amount.
     *
     * @return the amount
     */
    public double getAmount() {
        return amount;
    }

    /**
     * Sets amount.
     *
     * @param amount the amount
     */
    public void setAmount(double amount) {
        this.amount = amount;
    }

    /**
     * Gets unit.
     *
     * @return the unit
     */
    public String getUnit() {
        return unit;
    }

    /**
     * Sets unit.
     *
     * @param unit the unit
     */
    public void setUnit(String unit) {
        this.unit = unit;
    }
    ////////////////////////////////////////////////

    /**
     * Decrease amount.
     *
     * @param n the n
     */
    public void decreaseAmount(double n) {
        this.amount -= n;
    }

    /**
     * Add amount.
     *
     * @param n the n
     */
    public void addAmount(double n) {
        this.amount += n;
    }

    /**
     * Gets food info.
     *
     * @return the food info
     */
    public String getFoodInfo() {
        return this.name + " X " + this.amount + " " + this.unit;
    }

}
